<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"                
                template="./emall.xhtml">

    <ui:define name="content">
        <f:view>
            <h:form>
                <h1><h:outputText value="Mon panier"/></h1>
                <h:dataTable class="table table-striped" value="#{mbUsers.user.panier}" var="item">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Image"/>
                        </f:facet>
                        <h:graphicImage id="image"
                            alt="jsf-sun"
                            url="#{item.lienImage}"
                            width="50"
                            height="50">
                        </h:graphicImage>  
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nom"/>
                        </f:facet>
                        <h:outputText value="#{item.nom}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Description"/>
                        </f:facet>
                        <h:outputText value="#{item.description}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Prix"/>
                        </f:facet>
                        <h:outputText value="#{item.prix} &euro;"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Action"/>
                        </f:facet>
                        <h:commandButton id="update" value="Enlever" action="#{mbUsers.enleverPanier(item)}" class="btn btn-large btn-primary" />
                    </h:column>                    
                </h:dataTable>
            </h:form>
        </f:view>

    </ui:define>

</ui:composition>
